﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Search.ascx.cs" Inherits="HiTeachers.Web.Controls.Search" %>
<div id="cse-search-form" style="width: 100%;" dir="ltr">
    <form id="target" class="gsc-search-box" action="Search.aspx">
    <table class="gsc-search-box" cellspacing="0" cellpadding="0">
        <tbody>
            <tr>
                <td class="gsc-input">
                    <input id="iptKeyword" class="gsc-input" type="text" autocomplete="off" size="10"
                        name="search" title="tìm kiếm" style="background: none repeat scroll 0% 0% rgb(255, 255, 255);"
                        dir="ltr" />
                </td>
                <td class="gsc-search-button">
                    <input class="gsc-search-button" type="submit" id="googSearch" value="Tìm kiếm" title="tìm kiếm" />
                </td>
            </tr>
        </tbody>
    </table>
    </form>

    <script type="text/javascript" language="javascript">
        $(function() {
            $('#target').submit(function() {
                var keyWord = $("#iptKeyword").val();
                keyWord = encodeURIComponent(keyWord); //$.URLEncode(keyWord);
                //$("#iptKeyword").val($.URLEncode(keyWord));
                //$('#target').submit();
                window.location.href = "http://hiteachers.com/Search.aspx?search=" + keyWord;
            });
        });
    </script>

</div>
